package hunter20240514;

public class Test3 {
    public static void main(String[] args) {
        Student2 s = new Student2();
        s.setName("hunter");
        s.setAge(20);

        Teacher2 t = new Teacher2();
        t.setName("trista");
        t.setAge(30);

        Administrator2 a = new Administrator2();
        a.setName("xixi");
        a.setAge(50);

        register(s);
        register(t);
        register(a);
    }

    public static void register(Person2 p) {
        p.show();
    }
}
